﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HomePageCategories.ascx.cs"
    Inherits="CS424_9pts.Modules.HomePageCategories" %>
<div class="home-page-category-grid">
    <asp:DataList ID="dlCategories" runat="server" RepeatColumns="3" RepeatDirection="Horizontal"
        RepeatLayout="Table" ItemStyle-CssClass="item-box" EnableViewState="false" DataSourceID="BrandName">
        <ItemTemplate>
            <div class="category-item">
                <h2 class="title">
                    <asp:HyperLink ID="hlCategory" runat="server" NavigateUrl='<%#Eval("ImagesName") %>'
                        Text='<%#Eval("BrandName") %>' />
                </h2>
                <div class="picture">
                    <a href='<%#Eval("ImagesName") %>'>
                        <asp:Image ID="hlImageLink" runat="server" ImageUrl='<%#Eval("ImagesName")  %>' Height="100px" Width="125px" />
                    </a>
                </div>
            </div>
        </ItemTemplate>
    </asp:DataList>
</div>
<asp:SqlDataSource ID="BrandName" runat="server" ConnectionString="<%$ ConnectionStrings:CarManagementConnectionString %>"
    SelectCommand="SELECT [BrandName], [ImagesName], [Description] FROM [Brand]">
</asp:SqlDataSource>
